<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>求红白黑球的个数</title>
</head>
<body>
    <script>
        //red:11 white:14 black:17
        for(var white=0; white <= 31;white++){
            var red = 25 -white;black = 31-white;
            if(28 == red +black){
                alert('红球：'+red+'\n'+'白球：'+white+'\n'+'黑球：'+black);
            }
        }
    </script>
</body>
</html>